/**
 * @author Jeff Thomas 
 * @version 08.30.2007
 */

public class Coins3
{ 
    public static void main(String[] args)
    { 
        final int PENNY_VALUE = 1;
        final int NICKEL_VALUE = 5;
        final int DIME_VALUE = 10;
        final int QUARTER_VALUE = 25;
        final int HALF_DOLLAR_VALUE = 50; //Added value for half dollar coins
        final int DOLLAR_COIN_VALUE = 100; //Added value for dollar coins
        final int DOLLAR_VALUE = 100;
        
        int pennies = 8; //the purse contains 8 pennies
        int nickels = 0; //no nickels
        int dimes = 4; //four dimes
        int quarters = 3; // three quaters
        int halfCoins = 0; //no half dollar coins
        int dollarCoins = 0; //no dollar coins
        
        //compute total value in pennies
        
        int total = pennies*PENNY_VALUE + nickels*NICKEL_VALUE + dimes*DIME_VALUE + quarters*QUARTER_VALUE + halfCoins*HALF_DOLLAR_VALUE + dollarCoins*DOLLAR_COIN_VALUE; //Added calculation for half and dollar coins
        
        //use integer division to convert to dollars, cents
        
        int dollar = total / DOLLAR_VALUE;
        int cents = total % DOLLAR_VALUE;
        
        System.out.print("Total value = ");
        System.out.print(dollar);
        System.out.print(" dollar and ");
        System.out.print(cents);
        System.out.println(" cents");
    }
}